package com.ruoyi.kis.domain;

import cn.hutool.core.date.DateUtil;
import lombok.*;

import java.util.Date;

/**
 * @Author: zhanglm
 * @CreateDate: 2025-04-13 10:02
 * @FullNameClass: com.ruoyi.kis.domain.PoDanjuNumber
 * @Description: 单据格式po
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString
public class PoDanjuNumber {
    private String head;
    private int length;
    private String yyyyMMdd ;
    private String headyYyyyMMdd;
    private int FTranType;

    /**
     *
     * @param front 头(L0GR)
     * @param length 头长度
     * @param FTranType 单据类型
     */
    public PoDanjuNumber(String front,int length,int FTranType){
        this.head = front;
        this.length = length+8+1;//头+日期长度
        this.yyyyMMdd = DateUtil.format(new Date(), "yyyyMMdd");
//        this.headyYyyyMMdd = front.concat(yyyyMMdd);
        this.FTranType = FTranType;
    }
}
